import React from 'react';
import { useParams } from 'react-router-dom';
import OverallSituation from './training/OverallSituation';
import DataLabeling from './training/DataLabeling';
import FineTuning from './training/FineTuning';
import StrategyAnalysis from './training/StrategyAnalysis';
import TradingAgent from './training/TradingAgent';
// import MainForceModel from './strategy/MainForceModel.tsx';
// import FundModel from './strategy/FundModel.tsx';
// import SentimentModel from './strategy/SentimentModel.tsx';

const ModelTraining = () => {
  const { subpage } = useParams();
  
  // 如果没有二级页面参数，使用默认值
  const currentSubpage = subpage || 'overall-situation';
  
  const getPageTitle = () => {
    switch(currentSubpage) {
      case 'sentiment': return '市场情绪模型';
      case 'price-volume': return '主控量价模型';
      case 'capital': return '资金模型';
      case 'hotspot': return '舆情热点模型';
      case 'main-force-model': return '主力操盘模型';
      case 'fund-model': return '资金模型';
      case 'sentiment-model': return '情绪模型';
      case 'overall-situation': return '整体情况';
      case 'data-labeling': return '数据标注';
      case 'fine-tuning': return '大模型微调';
      case 'strategy-analysis': return '策略训练分析';
      case 'trading-agent': return '交易智能体';
      default: return '模型训练';
    }
  };
  
  const getPageContent = () => {
    switch(currentSubpage) {
      // case 'main-force-model': return <MainForceModel />;
      // case 'fund-model': return <FundModel />;
      // case 'sentiment-model': return <SentimentModel />;
      case 'overall-situation': return <OverallSituation />;
      case 'data-labeling': return <DataLabeling />;
      case 'fine-tuning': return <FineTuning />;
      case 'strategy-analysis': return <StrategyAnalysis />;
      case 'trading-agent': return <TradingAgent />;
      default: return <p>请从左侧选择训练选项</p>;
    }
  };

  return (
    <div className="page-container">
      <h2>{getPageTitle()}</h2>
      {getPageContent()}
    </div>
  );
};

export default ModelTraining;